package com.mtsmda.springMail;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class RunMail {

	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext(
				"springEmail.xml");
		SenderMail senderMail = (SenderMail) context.getBean("mailMail");
		senderMail.sendEmail("Dmitrii", "mynzat.sergei@gmail.com", "Test",
				"this is test message! \n http://statehistory.ru/356/Udarnaya-sila/");
		System.out.println("ok");

	}

}